function onSnapUploadHandler(node, VM) {
   
    // node.id
	
    if (typeof (node) == 'undefined' || typeof (node.imgurl) == 'undefined' || typeof (node.purpose) ==
        'undefined') {
        return;
    }

    switch (node.purpose) {
        case "receiver1":
            VM.$set(VM.formData.personList[node.index], "signature", node.imgurl);
            break;
        case "guardian":
            VM.$set(VM.formData, "guardian", node.imgurl);
            break;
        case "samplingDataPhoto":
            if (typeof (VM.formData2Arr) != 'undefined' &&
                typeof (VM.formData2Arr[node.index]) != 'undefined') {
                //  二维关系 暂时一维使用

                //VM.formData2Arr[node.index].photo.push(node.imgurl)
                VM.$set(VM.formData2Arr[node.index].photo, 0, node.imgurl);
            }

            break;
        case "safeMeasuresPhoto":
            VM.$set(VM.safeMeasuresList[node.index], "photo", node.imgurl);

            break;
    }
}
module.exports = {
    onSnapUploadHandler
}



				